<?php
	include_once "conf/conf.site.inc.php";
	include_once BDD_CLASS;
	include_once FUNCTIONS_FILE;
	
	if (isset($_SESSION["LOGIN"]) && $_SESSION["LOGIN"] != "") {
		redirect ("index_admin.php");
	}
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
		<meta charset="UTF-8" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> 
		<meta name="viewport" content="width=device-width, initial-scale=1.0"> 
		<center><title><?php echo NOM_SITE ?></title></center>
        <meta name="keywords" content="css3, login, form, custom, input, submit, button, html5, placeholder" />
        <link rel="shortcut icon" href="images/favicon.ico"> 
        <link rel="stylesheet" type="text/css" href="css/formulaire_connexion.css" />
		
		<link rel="stylesheet" type="text/css" href="css/style.css" />
</head>
<body>
<div id="logo">
	<h1><a href="#"><?php echo NOM_SITE ?></a></h1>
</div>
<div id="menu">
	<ul>
		<li class="first"><a href="index_admin.php" accesskey="1" title="">Acceuil</a></li>
		<?php if (isset($_SESSION["LOGIN"]) && $_SESSION["LOGIN"] != "") {echo '<li><a href="eleve_inscription.php" accesskey="2" title="">Inscrir son Enfant</a></li>';}?>
		<?php if (isset($_SESSION["LOGIN"]) && $_SESSION["LOGIN"] != "") {echo '<li><a href="logout.php" accesskey="6" title="">Déconnexion</a></li>';}?>
	</ul>
</div>
<hr />
<div id="banner"><img src="images/img04.jpg" alt="" width="960" height="147" /></div>
<!-- start page -->
<div id="page">
	<!-- start content -->
	<div id="content">
		<div class="post">
			<section class="main">
				<form class="form-1" method="POST" action="index_admin.php">
					<p class="field">
						<input type="text" name="login" placeholder="Username or email" />
						<i class="icon-user icon-large"></i>
					</p>
						<p class="field">
							<input type="password" name="password" placeholder="Password" />
							<i class="icon-lock icon-large"></i>
					</p>
					<p class="submit">
						<button type="submit" name="submit"><i class="icon-arrow-right icon-large"></i></button>
					</p>
					<?php
						if (isset($_GET["badlogin"]) && $_GET["badlogin"] == 1) {
							echo "<center class='badlogin'>Login ou Mot de Passe incorrect. Veuillez Réessayer</center>";
						}
					?>
				</form>
				<div class="links">
					<a href="password_forgot.php">Mot de passe oublié</a><br/>
					<a href="create_account.php">Inscription</a>
				</div>
			</section>
		</div>
	</div>
	<!-- end content -->
</div>
<!-- end page -->
<div id="footer">
	<p class="legal"><?php echo FOOTER ?></p>
</div>
</body>
</html>
